package com.github.maojx0630.easy.translate.spring;

import lombok.experimental.UtilityClass;
import org.springframework.context.ApplicationContext;

/**
 * @author 毛家兴
 * @since 2024-02-04 15:12
 */
@UtilityClass
public class TranslateSpringUtil {

  private final ApplicationContext applicationContext =
      ApplicationContextAwareImport.applicationContext;

  public <T> T getBean(Class<T> tClass) {
    return applicationContext.getBean(tClass);
  }

  public ApplicationContext getApplicationContext() {
    return applicationContext;
  }
}
